1. Field of the Invention
The invention relates to image processing, particularly with respect to smoothing an image represented as a matrix of digitized picture elements (pixels).
2. Description of the Prior Art
Image smoothing is commonly performed in image processing technology for such applications as pattern recognition, optical character recognition, map correlation, optical inspection and the like. In known image smoothing algorithms, each pixel is processed, one at a time, by examining the pixel environment comprising the pixels in a predetermined neighborhood thereof. Depending on the statistics of the pixels in the neighborhood, including the pixel under processing, the pixel under processing is altered in accordance with whether the statistics of the pixels in the neighborhood exceed a predetermined threshold. For example, the nine pixels in a square centered on the pixel under processing may be averaged and the average value substituted for the pixel under processing. In a binary image pattern, the center pixel may be forced to a value of ONE or ZERO if the majority of the nine pixel elements in the square neighborhood is ONE or ZERO, respectively. Alternatively, the neighborhood may comprise the pixels immediately above and below, and immediately to the right and left of the pixel under processing. Another arrangement may be to utilize the five pixels comprising the pixel under processing and the four diagonally adjacent pixels.
Image smoothing traditionally is performed digitally by reading the image into the processor memory as digital data and performing the smoothing as a software processing routine on the data. A typical type of smoothing operation on a binary image pattern was described above, where each 3.times.3 picture element subarray of the image is examined and the central element forced to a value of ONE or ZERO if the majority of the nine elements is ONE or ZERO, respectively. The majority decision is the only averaging algorithm possible with binary information. Other smoothing procedures may, however, be utilized. For example, rather than forcing the central picture element to ONE if five or more of the nine elements are ONE and to a value of ZERO otherwise, the procedure can be generalized to force the central element to ONE if and only if N or more of the nine elements have the value ONE. A value of N less than five allows the areas of ONE's to expand, whereas a value greater than five forces the ONE areas to contract. If the black areas of the image (i.e. the ONE's) are small compared to the white areas (ZERO's) or if the noise to be smoothed is predominantly ZERO's embedded in ONE's, a value of N=4 is likely to be more optimal for smoothing than a value of N=5. If the ONE areas predominate over the ZERO areas, then a value of N=6 might be more optimal for smoothing. The image may be a two-dimensional image represented by a total of 1024 by 1024 pixels arranged in digital storage as a scanned sequence of 65,536 sixteen bit words.
Such prior art image smoothing procedures tend to be exceedingly slow since the pixel environments are sequentially examined, one element at a time. Such prior art image smoothing techniques utilizing a digital computer necessarily involve time consuming bit shifting routines. Alternatively, hard wired electronic circuitry may be constructed to perform these functions. Although such circuitry tends to be faster than software equivalents, such devices tend to be complex and hence expensive.